Blockchain-based patrol inspection proof storage method, apparatus, and electronic device

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for blockchain-based storage of patrol inspection proof are provided. One of the methods includes: receiving proof information of patrol inspection at a patrol inspection site; obtaining one or more operating environment parameters of the mobile terminal at a time of the patrol inspection, wherein the one or more operating environment parameters comprise at least location information and sensor data of the mobile terminal; performing credibility verification on the patrol inspection site based on the proof information, the location information, and the sensor data using an algorithm model based on labeled identification information, labeled operating environment parameters, and historical attendance information; and in response to the credibility verification being successful, uploading verification information associated with the proof information for storing in a blockchain.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of U.S. patentapplication Ser. No. 16/886,657 filed May 28, 2020, which is acontinuation application of International Patent Application No.PCT/CN2020/071563, filed with the China National Intellectual PropertyAdministration (CNIPA) on Jan. 11, 2020, which is based on and claimspriority to and benefit of Chinese Patent Application No.201910521227.3, filed with the CNIPA on Jun. 17, 2019. The entirecontents of all of the above-identified applications are incorporatedherein by reference.

TECHNICAL FIELD

The specification relates to the field of computer technologies, and inparticular, to a blockchain-based patrol inspection proof storagemethod, an apparatus, an electronic device, and a computer readablestorage medium.

BACKGROUND

In a large number of offline sites such as shopping malls, officebuildings, schools, factories, hotels, or residential buildings, patroltasks for fire protection, safety, and the like need to be regularly andconsistently conducted. Currently, patrol inspections are mainlyperformed by manpower. Specifically, a person on duty goes to aspecified patrol inspection site at a specified time or at a specifiedfrequency, to inspect and confirm a safety status of the site. Mostpatrol inspections are performed by manpower and have no supervisionmechanism and no data record, leading to high costs or difficulty incause confirmation and liability retroaction afterwards.

SUMMARY

Embodiments of the specification provide a blockchain-based patrolinspection proof storage method, an apparatus, an electronic device, anda computer readable storage medium, so that a traceable and tamperproofinformation record can be conveniently implemented.

To resolve the foregoing technical problems in the prior art, theembodiments of the specification are implemented as follows.

An embodiment of the specification provides a blockchain-based patrolinspection proof storage method, including: collecting patrol inspectionproof information of a patrol inspection site using a mobile terminal;obtaining operating environment parameters when the mobile terminalcollects the patrol inspection proof information, wherein the operatingenvironment parameters include at least location-related information andsensor data of the mobile terminal; and uploading irreversibleverification information of patrol inspection proof storage informationto a proof storage blockchain, wherein the proof storage blockchain isconfigured to verify that data stored in the proof storage blockchain istrusted, and the patrol inspection proof storage information includesthe patrol inspection proof information and includes thelocation-related information and/or the sensor data.

An embodiment of the specification further provides a blockchain-basedpatrol inspection proof storage method, including: collecting patrolinspection proof information of a patrol inspection site using a mobileterminal; obtaining operating environment parameters when the mobileterminal collects the patrol inspection proof information, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal; performingcredibility verification on the patrol inspection site based on thelocation-related information and the sensor data; and when thecredibility verification succeeds, uploading irreversible verificationinformation of patrol inspection proof storage information to a proofstorage blockchain, wherein the proof storage blockchain is configuredto verify that data stored in the proof storage blockchain is trusted,and the patrol inspection proof storage information includes at leastthe patrol inspection proof information.

An embodiment of the specification further provides a patrol inspectionverification method, including: receiving a filtering condition input byan inspection person, wherein the filtering condition is used to filterpatrol inspection proof storage information of a specified patrolinspection person at a specified patrol inspection site; querying,according to the filtering condition, for the patrol inspection proofstorage information corresponding to the specified patrol inspectionperson and the specified patrol inspection site; and performingcredibility verification on the patrol inspection proof storageinformation based on irreversible verification information thatcorresponds to the specified patrol inspection person and the specifiedpatrol inspection site and that is stored in a proof storage blockchain.

An embodiment of the specification further provides a blockchain-basedpatrol inspection proof storage apparatus, including: a proofinformation collection module, configured to collect patrol inspectionproof information of a patrol inspection site; an environment parametercollection module, configured to obtain operating environment parameterswhen the patrol inspection proof information is collected, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal; and an informationstorage module, configured to upload irreversible verificationinformation of patrol inspection proof storage information to a proofstorage blockchain, wherein the proof storage blockchain is configuredto verify that data stored in the proof storage blockchain is trusted,and the patrol inspection proof storage information includes the patrolinspection proof information and includes the location-relatedinformation and/or the sensor data.

An embodiment of the specification further provides a blockchain-basedpatrol inspection proof storage apparatus, including: a proofinformation collection module, configured to collect patrol inspectionproof information of a patrol inspection site; an environment parametercollection module, configured to obtain operating environment parameterswhen the patrol inspection proof information is collected, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal; a credibilityverification module, configured to perform credibility verification onthe patrol inspection site based on the location-related information andthe sensor data; and a proof information storage module, configured to:when the credibility verification succeeds, upload irreversibleverification information of patrol inspection proof storage informationto a proof storage blockchain, wherein the proof storage blockchain isconfigured to verify that data stored in the proof storage blockchain istrusted, and the patrol inspection proof storage information includes atleast the patrol inspection proof information.

An embodiment of the specification further provides a patrol inspectionverification apparatus, including: a condition receiving module,configured to receive a filtering condition input by an inspectionperson, wherein the filtering condition is used to filter patrolinspection proof storage information of a specified patrol inspectionperson at a specified patrol inspection site; a file querying module,configured to query, according to the filtering condition, for thepatrol inspection proof storage information corresponding to thespecified patrol inspection person and the specified patrol inspectionsite; and a file verification module, configured to perform credibilityverification on the patrol inspection proof storage information based onirreversible verification information that corresponds to the specifiedpatrol inspection person and the specified patrol inspection site andthat is stored in a proof storage blockchain.

An embodiment of the specification further provides a computer device,including: a memory, a processor, and computer-executable instructionsthat are stored in the memory and that are executable on the processor,wherein when the computer-executable instructions are executed by theprocessor, the following operations are performed: collecting patrolinspection proof information of a patrol inspection site using a mobileterminal; obtaining operating environment parameters when the mobileterminal collects the patrol inspection proof information, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal; and uploadingirreversible verification information of patrol inspection proof storageinformation to a proof storage blockchain, wherein the proof storageblockchain is configured to verify that data stored in the proof storageblockchain is trusted, and the patrol inspection proof storageinformation includes the patrol inspection proof information andincludes the location-related information and/or the sensor data.

An embodiment of the specification further provides a computer-readablestorage medium, wherein the computer-readable storage medium isconfigured to store a computer-executable instruction, and when thecomputer-executable instructions are executed by a processor, thefollowing operations are performed: collecting patrol inspection proofinformation of a patrol inspection site using a mobile terminal;obtaining operating environment parameters when the mobile terminalcollects the patrol inspection proof information, wherein the operatingenvironment parameters include at least location-related information andsensor data of the mobile terminal; and uploading irreversibleverification information of patrol inspection proof storage informationto a proof storage blockchain, wherein the proof storage blockchain isconfigured to verify that data stored in the proof storage blockchain istrusted, and the patrol inspection proof storage information includesthe patrol inspection proof information and includes thelocation-related information and/or the sensor data.

In one aspect, a method for blockchain-based storage of patrolinspection proof is provided. The method includes: receiving proofinformation of patrol inspection at a patrol inspection site; obtainingone or more operating environment parameters of the mobile terminal at atime of the patrol inspection, wherein the one or more operatingenvironment parameters comprise at least location information and sensordata of the mobile terminal; performing credibility verification on thepatrol inspection site based on the proof information, the locationinformation, and the sensor data using an algorithm model based onlabeled identification information, labeled operating environmentparameters, and historical attendance information; and in response tothe credibility verification being successful, uploading verificationinformation associated with the proof information for storing in ablockchain.

In an embodiment, the method further comprises: receiving, from a clientterminal, one or more filtering conditions associated with the patrolinspection site; querying to identify the proof information of thepatrol inspection at the patrol inspection site; verifying theidentified proof information based on the verification informationstored in the blockchain; returning, to the client terminal, averification result indicating that the identified proof information isverified.

In an embodiment, the proof information comprises biometric recognitioninformation of a patrol inspection person conducting the patrolinspection.

In an embodiment, the location information comprises: global positioningsystem (GPS) positioning information of the mobile terminal; basestation information within a first preset distance from the mobileterminal; wireless fidelity (Wi-Fi) information within a second presetdistance from the mobile terminal; Bluetooth information within a thirdpreset distance from the mobile terminal; or hotspot information withina fourth preset distance from the mobile terminal.

In an embodiment, the sensor data comprises: temperature information,humidity information, atmospheric pressure information, or sensor dataof at least one axis of a multi-axis sensor.

In an embodiment, the one or more operating environment parametersfurther comprise: a focal length of a camera.

In an embodiment, the proof information comprises: a visual file of amarker of the patrol inspection site captured using the mobile terminal.

In an embodiment, the proof information comprises: information obtainedby scanning a barcode of the patrol inspection site using the mobileterminal.

In an embodiment, the proof information comprises: information in asignal received by an NFC module of the mobile terminal from an NFCdevice at the patrol inspection site.

In an embodiment, the verification information comprises: a digest ofthe proof information and the one or more operating environmentparameters; or a digital signature on the digest based on a private keyof a patrol inspection person conducting the patrol inspection.

In an embodiment, the proof information or the one or more operatingenvironment parameters comprise a time stamp of the patrol inspection.

In another aspect, a system for blockchain-based storage of patrolinspection proof is provided. The system comprises a processor and anon-transitory computer-readable storage medium storing instructionsexecutable by the processor to cause the system to perform operations.The operations include: receiving proof information of patrol inspectionat a patrol inspection site; obtaining one or more operating environmentparameters of the mobile terminal at a time of the patrol inspection,wherein the one or more operating environment parameters comprise atleast location information and sensor data of the mobile terminal;performing credibility verification on the patrol inspection site basedon the proof information, the location information, and the sensor datausing an algorithm model based on labeled identification information,labeled operating environment parameters, and historical attendanceinformation; and in response to the credibility verification beingsuccessful, uploading verification information associated with the proofinformation for storing in a blockchain.

In yet another aspect, a non-transitory computer-readable storage mediumfor blockchain-based storage of patrol inspection proof is provided. Themedium is configured with instructions executable by one or moreprocessors to cause the one or more processors to perform operations.The operations include: receiving proof information of patrol inspectionat a patrol inspection site; obtaining one or more operating environmentparameters of the mobile terminal at a time of the patrol inspection,wherein the one or more operating environment parameters comprise atleast location information and sensor data of the mobile terminal;performing credibility verification on the patrol inspection site basedon the proof information, the location information, and the sensor datausing an algorithm model based on labeled identification information,labeled operating environment parameters, and historical attendanceinformation; and in response to the credibility verification beingsuccessful, uploading verification information associated with the proofinformation for storing in a blockchain. The solutions of theembodiments of the specification can achieve the following beneficialeffects.

The patrol inspection proof information and the operating environmentparameters are stored using a blockchain technology, so that a traceableand tamperproof patrol inspection information record can be convenientlyimplemented. Once the information record needs to be traced, a cause ofan event can be confirmed by a patrol inspection information recordstored in a blockchain, and credibility of the traced information recordis ensured. In this way, confidence and traceability of a patrolinspection information record of the patrol inspection person can beimproved, thereby improving safety of a site and reducing a probabilityof safety problem occurrence.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings described herein are used for providingfurther understanding for the specification and constitute a part of thespecification. Embodiments of the specification and descriptions thereofare used for explaining the specification and do not constitute anylimitation to the specification.

FIG. 1 is a flowchart of a patrol inspection position labelling method,according to an embodiment of the specification.

FIG. 2 is a flowchart of a blockchain-based patrol inspection proofstorage method, according to an embodiment of the specification.

FIG. 3 is a flowchart of a blockchain-based patrol inspection proofstorage method, according to another embodiment of the specification.

FIG. 4 is a flowchart of a patrol inspection verification method,according to an embodiment of the specification.

FIG. 5 is a schematic structural diagram of a blockchain-based patrolinspection proof storage apparatus, according to an embodiment of thespecification.

FIG. 6 is a schematic structural diagram of a blockchain-based patrolinspection proof storage apparatus, according to another embodiment ofthe specification.

FIG. 7 is a schematic structural diagram of a patrol inspectionverification apparatus, according to an embodiment of the specification.

FIG. 8 is a schematic structural diagram of an electronic device,according to an embodiment of the specification.

FIG. 9 is a schematic structural diagram of another electronic device,according to an embodiment of the specification.

DETAILED DESCRIPTION OF THE EMBODIMENTS

To make the objectives, technical solutions, and advantages of thespecification clearer, the following clearly and completely describesthe technical solutions of the specification with reference to specificembodiments of the specification and the corresponding accompanyingdrawings. Apparently, the described embodiments are only someembodiments rather than all the embodiments of the specification. Allother embodiments obtained by a person of ordinary skill in the artbased on the embodiments of the specification without creative effortsshall fall within the protection scope of the specification.

The technical solution provided by various embodiments of thespecification will be described in detail below with reference to theaccompanying drawings.

The procedure of this embodiment of the specification is as follows. Apatrol inspection management person completes a position labelling at ato-be-labeled site using a mobile terminal. A patrol inspection persongoes to the labeled positions and checks in, such as records anattendance using a mobile terminal. An inspection person verifies theattendance record of the patrol inspection person.

Before the patrol inspection person performs the patrol inspection andrecords the attendance, the patrol inspection management person needs toperform a position labelling at a to-be-labeled site using a mobileterminal. FIG. 1 is a flowchart of a patrol inspection positionlabelling method, according to an embodiment of the specification. Theprocess is as follows.

Step S11: obtain labeled identification information of the to-be-labeledpositions using the mobile terminal.

Step S13: obtain labeled operating environment parameters of the mobileterminal at the to-be-labeled positions using the mobile terminal.

Step S15: compute position quality of the to-be-labeled positionsaccording to the labeled operating environment parameters.

Step S17: determine, according to the position quality, whether ato-be-labeled position can be used as a labeled position. If ato-be-labeled position cannot be used as a labeled position, discard theto-be-labeled position. If a to-be-labeled position can be used as alabeled position, store the labeled identification information and thelabeled operating environment parameters, and store irreversibleverification information of the labeled identification information andthe labeled operating environment parameters to a blockchain, tocomplete the position labelling.

The labeled identification information is identification information setby the patrol inspection management person at the labeled positions. Thelabeled identification information may include one or more of: areference marker photo, a reference marker video, two-dimensionalbarcode information, near-field communication (NFC) information, or thelike.

In addition, the mobile terminal used by the patrol inspectionmanagement person may be a mobile phone or other devices capable ofsatisfying a sensed parameter requirement. Using a mobile phone as anexample, description is as follows.

An application (APP) or an applet for a position labelling is installedon the mobile phone, the patrol inspection management person logs in tothe APP or the applet using a management account, and enters a patrolinspection position labelling page to perform the position labelling.

In this embodiment of the specification, an identifier set for thelabeled position may be a landmark, for example, a specific building,plants, or the like, may be a two-dimensional barcode including specificinformation, or may be an NFC device including specific information, orthe like.

When the identifier is a marker, the patrol inspection management persongoes to the to-be-labeled position, selects a marker, enters a labellingpage using the mobile phone, starts a first camera on the labelling pageto image the marker, obtains a reference marker photo, and uses thephoto as labelling indication information of the to-be-labeled position.When the photo is taken, a labeled operating environment parameter ofthe mobile phone at the current to-be-labeled position is collected. Thelabeled operating environment parameter refers to an operatingenvironment parameter of the mobile terminal at a labeled position,wherein the operating environment parameter includes location-relatedinformation, sensor data of the mobile terminal, a focal length of acamera, or a combination thereof.

The location-related information includes Global Positioning System(GPS) positioning information of the mobile terminal, base stationinformation within a first preset distance from the mobile terminal,wireless fidelity (Wi-Fi) information within a second preset distancefrom the mobile terminal, Bluetooth information within a third presetdistance from the mobile terminal, hotspot information within a fourthpreset distance from the mobile terminal, or a combination thereof.

The base station information may include identification information ofthe base station, signal strength of the base station, or a combinationthereof. The identification information of the base station may includea name of the base station, an address of the base station, or the like.

The Wi-Fi information may include one or more of Wi-Fi identificationinformation, signal strength, or the like. Similarly, the Wi-Fiidentification information may include a Wi-Fi name, a Wi-Fi MACaddress, or the like.

The hotspot information may include identification information of ahotspot, signal strength of the hotspot, or a combination thereof.Similarly, the identification information of the hotspot may include aname of the hotspot, an address of the hotspot, or the like.

In addition, the sensor data may include one of the following:temperature information; humidity information; atmospheric pressureinformation; or sensor data of at least one axis of a multi-axis sensor.

The temperature information may be collected using a temperature sensoror a temperature and humidity sensor. The humidity information may becollected using a humidity sensor or a temperature and humidity sensor.The atmospheric pressure information may be collected using anothersensor. The multi-axis sensor may include a 3-axis sensor, a 6-axissensor, a 9-axis sensor, or the like.

In addition, the first camera may be a rear-facing camera of the mobilephone.

When the identifier is a two-dimensional barcode, the patrol inspectionmanagement person goes to a to-be-labeled position, sticks atwo-dimensional barcode to the to-be-labeled position, enters alabelling page using the mobile phone, and starts the first camera onthe labelling page to scan the two-dimensional barcode and obtaintwo-dimensional barcode information. When the two-dimensional barcode isscanned using the mobile phone, labeled operating environment parametersof the mobile phone at the current to-be-labeled position is collected,wherein the labeled operating environment parameters are the same as theforegoing parameters. The first camera may be a rear-facing camera ofthe mobile phone.

When the identifier is an NFC device, the patrol inspection managementperson goes to a to-be-labeled position, disposes the NFC device at theto-be-labeled position, enters a labelling page using the mobile phone,and starts an NFC module of the mobile phone on the labelling page toconnect the mobile phone to the NFC device and obtain NFC information.When the NFC device is connected using the mobile phone, labeledoperating environment parameters of the mobile phone at the currentto-be-labeled position are collected.

In this embodiment of the specification, the identifier may further beset in other forms, and the identifier may be set to one or more of amarker, a two-dimensional barcode, an NFC device, and the like. Thesolution in which the identifier is a marker has lower costs, noadditional resource consumption, and unlikeliness to change. In thesolution having a two-dimensional barcode, a two-dimensional barcodeneeds to be stuck at each patrol inspection site, and thetwo-dimensional barcode is likely to be damaged, which may cause thatthe patrol inspection person fails to record the attendance or add anattendance record. The solution using an NFC device has higher costs andlikeliness to be damaged, which may also cause that the patrolinspection person fails to add an attendance record.

Step S15: compute position quality of the to-be-labeled positionaccording to the labeled operating environment parameters.

A higher quality score of the position indicates more accurate locationpositioning in the subsequent verification of the patrol inspectionattendance record. For example, a larger number of Wi-Fi hotspots in thesurroundings indicates higher signal strength, more accurate positioningin the subsequent verification of the patrol inspection attendancerecord, and a higher labelling quality score of the position.

Step S17: determine, according to the position quality, whether theto-be-labeled position can be used as a labeled position. If theto-be-labeled position cannot be used as a labeled position, discard theto-be-labeled position. If the to-be-labeled position can be used as alabeled position, store the labeled identification information and thelabeled operating environment parameters, and store irreversibleverification information of the labeled identification information andthe labeled operating environment parameters to a blockchain, tocomplete the position labelling.

The computed position quality of the to-be-labeled position is comparedwith a preset quality threshold. If the position quality of theto-be-labeled position is lower than the preset quality threshold, theto-be-labeled position may not be used as a labeled position, and theto-be-labeled position is discarded. If the position quality of theto-be-labeled position is not lower than the preset quality threshold,the to-be-labeled position may be used as a labeled position, labeledidentification information and a collected labeled operating environmentparameter of the to-be-labeled position are collected and stored to acloud in as a file. A hash value of the file is computed, and the hashvalue is stored to a blockchain, to complete the position labelling.

After the position labelling is completed, the patrol inspectionmanagement person may further query and manage on a management page ofthe mobile phone.

After the patrol inspection position is labeled, the patrol inspectionperson may add an attendance record at the position. As shown in FIG. 2,an embodiment of the specification provides a blockchain-based patrolinspection proof storage method, including the following steps.

Step S21: collect proof information of patrol inspection at a patrolinspection site using a mobile terminal.

The patrol inspection proof information refers to identificationinformation obtained by a patrol inspection person at a patrolinspection site, for example, one or more of a visual file having amarker, barcode information, an NFC signal, or the like.

The patrol inspection proof information may be obtained in one or moreof the following three manners.

A first manner: a marker at a patrol inspection site is imaged by themobile terminal, to obtain a visual file of the marker, and the visualfile is used as the patrol inspection proof information. The visual filemay be a captured video or picture.

A second manner: a barcode of the patrol inspection site is scanned bythe mobile terminal, to obtain the patrol inspection proof informationcarried in the barcode. The barcode may include a one-dimensionalbarcode or a two-dimensional barcode. The barcode carrying codeinformation may be used as the patrol inspection proof information.

A third manner: A signal sent by an NFC device at the patrol inspectionsite is received by an NFC module of the mobile terminal, to obtain thepatrol inspection proof information carried in the signal.

When the patrol inspection proof information of the patrol inspectionsite is collected by the mobile terminal, a time stamp may be included,wherein the time stamp is a system time of a mobile terminal when thepatrol inspection proof information is obtained during the patroninspection.

Step S23: obtain operating environment parameters when the mobileterminal collects the patrol inspection proof information, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal.

When the patrol inspection proof information is obtained, the operatingenvironment parameters of the mobile terminal need to be obtained. Whenthe operating environment parameters are obtained, a current time stampmay also be obtained, wherein the time stamp is a system time of themobile terminal when the operating environment parameters are obtainedduring the patron inspection.

By comparing the time stamp of the operating environment parameters withthe time stamp of the patrol inspection proof information, whether theoperating environment parameters and the patrol inspection proofinformation are obtained simultaneously can be determined. If theoperating environment parameters and the patrol inspection proofinformation are not obtained simultaneously, it indicates that currentattendance record is abnormal.

For the operating environment parameter, the location-relatedinformation and the sensor data in this embodiment of the specificationmay refer to the location-related information and the sensor data in theembodiment shown in FIG. 2. The details are not described again.

Before the uploading irreversible verification information of the patrolinspection proof information, the location-related information and thesensor data to a proof storage blockchain, the method may furtherinclude: performing credibility verification on the patrol inspectionsite and/or the patrol inspection person, and when the credibilityverification succeeds, uploading the irreversible verificationinformation of the patrol inspection proof information, thelocation-related information, and the sensor data to the proof storageblockchain.

After the patrol inspection proof information and the operatingenvironment parameters are obtained, credibility verification may beperformed on a current patrol inspection site according to the patrolinspection proof information and the operating environment parameter. Inthis way, whether the patrol inspection proof information collected bythe mobile terminal is actually collected at the patrol inspection sitecan be verified, to discover a forged patrol inspection proofinformation scenario.

When the patrol inspection proof information of the patrol inspectionsite is collected by the mobile terminal, the method may further includecollecting biometric recognition information of the patrol inspectionperson.

The performing credibility verification on the patrol inspection personincludes performing credibility verification on the patrol inspectionperson according to the biometric recognition information.

When the patrol inspection person needs to be verified, the biometricrecognition information of the patrol inspection person needs to beobtained when the patrol inspection proof information is obtained, andfurther, credibility verification is performed on the patrol inspectionperson according to the biometric recognition information. By performingcredibility verification on the patrol inspection person, a realidentity of the patrol inspection person can be determined, to verifythat the patrol inspection person is a corresponding patrol inspectionperson at a corresponding patrol inspection site and a patrol inspectiontime. When there is no requirement on a patrol inspection person andthere is a requirement on a patrol inspection site only, a personnelverification function may be disabled. Only the patrol inspection proofinformation and the operating environment parameters need to be obtainedfor credibility verification on the patrol inspection site. Thebiometric recognition information may include one or more of a visualfile including a human head portrait, a human facial feature, a humanfingerprint feature, and the like. The visual file may be a video or apicture.

The mobile terminal used by the patrol inspection person may be a mobilephone or another device that is capable of satisfying a requirement forcollecting a sensed parameter. Using a mobile phone as an example,description is as follows.

When the patrol inspection person arrives at a patrol inspectionposition, the patrol inspection person enters an attendance record pageusing an APP or an applet of the mobile phone, selects an attendancerecord site, and record the attendance. Three manners for obtaining thepatrol inspection proof information are described in step S21. Aspecific manner for obtaining the operating environment parameters andthe biometric recognition information include the following severalcases.

A first case: the identifier is a marker.

When the biometric recognition information needs to be collected, thefollowing three manners are included.

1) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts a firstcamera and a second camera of the device simultaneously, and the patrolinspection person directs the first camera at the marker to image themarker, and at the same time, directs the second camera at the face ofthe patrol inspection person to image the face synchronously, to obtaina visual file including the marker and a visual file including a humanhead portrait.

2) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera and the second camera simultaneously, and the patrolinspection person directs the first camera at the marker to image themarker, and at the same time, directs the second camera at the face ofthe patrol inspection person to perform face recognition, to obtain avisual file including the marker and a human facial feature.

3) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera and simultaneously starts a fingerprint recognition moduleon a screen, and the patrol inspection person directs the first cameraat the marker to image the marker, and at the same time, verifies afingerprint on a screen, to obtain a visual file including the markerand a human fingerprint feature.

If the biometric recognition information does not need to be collected,when the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera only, and the patrol inspection person directs the firstcamera at the marker to image the marker, to obtain a visual fileincluding the marker.

Regardless of whether the biometric recognition information iscollected, the operating environment parameters of the mobile terminalare collected when the first camera is directed at the marker to imagethe marker.

A second case: the identifier is a two-dimensional barcode.

Similarly, when the biometric recognition information needs to becollected, the following three manners are included.

1) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera and the second camera of the device simultaneously, and thepatrol inspection person directs the first camera at the two-dimensionalbarcode to scan the two-dimensional barcode, and at the same time,directs the second camera at the face of the patrol inspection person toimage the face synchronously, to obtain two-dimensional barcodeinformation and a visual file that includes a human head portrait.

2) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera and the second camera simultaneously, and the patrolinspection person directs the first camera at the two-dimensionalbarcode to scan the two-dimensional barcode, and at the same time,directs the second camera at the face of the patrol inspection person toperform face recognition, to obtain two-dimensional barcode informationand a human facial feature.

3) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera and simultaneously starts the fingerprint recognitionmodule on the screen, and the patrol inspection person directs the firstcamera at the two-dimensional barcode to scan the two-dimensionalbarcode, and at the same time, verifies a fingerprint on the screen, toobtain two-dimensional barcode information and a human fingerprintfeature.

If the biometric recognition information does not need to be collected,when the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts thefirst camera only, and the patrol inspection person directs the firstcamera at the two-dimensional barcode to scan the two-dimensionalbarcode, to obtain two-dimensional barcode information.

Regardless of whether the biometric recognition information iscollected, the operating environment parameters of the mobile terminalare collected when the first camera is directed at the two-dimensionalbarcode to scan the two-dimensional barcode.

A third case: the identifier is an NFC device.

Similarly, when the biometric recognition information needs to becollected, the following three manners are included.

1) When the mobile terminal receives an attendance record recording sentby the patrol inspection person, the mobile terminal starts an NFCmodule and the second camera of the device simultaneously, and thepatrol inspection person obtains, using the NFC module of the mobileterminal, a signal sent by the NFC device, and at the same time, directsthe second camera at the face of the patrol inspection person to imagethe face synchronously, to obtain NFC information and a visual file thatincludes a human head portrait.

2) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts the NFCmodule and the second camera of the device simultaneously, and thepatrol inspection person obtains, using the NFC module of the mobileterminal, a signal sent by the NFC device, and at the same time, directsthe second camera at the face of the patrol inspection person to performface recognition, to obtain NFC information and a human facial feature.

3) When the mobile terminal receives an attendance recording instructionsent by the patrol inspection person, the mobile terminal starts the NFCmodule and simultaneously starts the fingerprint recognition module onthe screen, and the patrol inspection person obtains, using the NFCmodule of the mobile terminal, a signal sent by the NFC device, and atthe same time, verifies a fingerprint on the screen, to obtain NFCinformation and a human fingerprint feature.

When the biometric recognition information does not need to becollected, when the mobile terminal receives an attendance recordinginstruction sent by the patrol inspection person, the mobile terminalstarts the NFC module only, and the patrol inspection person obtains,using the NFC module of the mobile terminal, a signal sent by the NFCdevice, to obtain NFC information.

Regardless of whether the biometric recognition information iscollected, the operating environment parameters of the mobile terminalare collected when the NFC module of the mobile terminal is used toobtain a signal sent by the NFC device.

In the foregoing three cases, the first camera may be a rear-facingcamera, and the second camera may be a front-facing camera. Thebiometric recognition information may be collected in three manners:fingerprint verification, human imaging, or human face recognition. Thethree manners may exist independently. The fingerprint verification andthe human imaging may coexist, and the fingerprint verification and thehuman face recognition may also coexist, and may be combined withvarious manners of collecting the patrol inspection proof information.The above all fall within the protection scope of the specification.

In this embodiment of the specification, when the patrol inspectionproof information, the operating environment parameter, and thebiometric recognition information are collected, corresponding timestamps are recorded. Whether the patrol inspection proof information,the operating environment parameter, and the biometric recognitioninformation are collected simultaneously may be determined according tothe time stamps of the patrol inspection proof information, theoperating environment parameter, and the biometric recognitioninformation. In an embodiment, whether the patrol inspection proofinformation, the operating environment parameter, and the biometricrecognition information are collected simultaneously may becomprehensively determined according to the collected patrol inspectionproof information, the collected operating environment parameter, andthe collected biometric recognition information, for example, may bedetermined according to features such as a position change of a markerin a photo, a shake direction in the imaging, a movement distance in theimaging, and a focal length of a camera. In this way, a maliciousattendance recording may be avoided.

Step S25: upload the irreversible verification information of the patrolinspection proof information, the location-related information, and thesensor data to a blockchain for patrol inspection proof storage, whereinthe blockchain for patrol inspection proof storage is configured toverify that data stored in the blockchain can be trusted.

In this embodiment of the specification, the method may further include:obtaining patrol inspection event information, and uploading the patrolinspection event information and the irreversible verificationinformation of the patrol inspection proof information, thelocation-related information, and the sensor data to the blockchain forpatrol inspection proof storage. The patrol inspection event informationrefers to patrol inspection result information about a patrol inspectionperformed by the patrol inspection person at a patrol inspection site.

The irreversible verification information is signature information(i.e., a digital signature) after the patrol inspection person signs adigest using a private key, or the irreversible verification informationincludes a digest and signature information for the patrol inspectionperson to sign the digest using a private key. The digest refers to thepatrol inspection proof information, the location-related information,the sensor data, or the like. The irreversible verification informationmay be entire irreversible verification information after all pieces ofinformation are arranged in a preset sequence, may be each piece ofirreversible verification information after the irreversibleverification information is divided into a plurality of pieces, or maybe irreversible verification information obtained after a plurality oftimes of irreversible encryption are performed on all files according toone or more irreversible encryption algorithms.

Storage is performed using a blockchain technology, so that a traceableand tamperproof information record can be ensured. Thus, when a problemoccurs, the cause confirmation and liability retroaction processes ofthe event can be trusted. In this way, quality of a task completed bythe patrol inspection person can be improved, thereby improving safetyof a site and reducing a probability of safety problem occurrence suchas a fire disaster.

After the patrol inspection proof information, the location-relatedinformation, and the sensor data are obtained, credibility verificationmay further be performed on a patrol inspection site according to thepatrol inspection proof information, the location-related information,and the sensor data. After the biometric recognition information isobtained, credibility verification may further be performed on a personaccording to the biometric recognition information.

When credibility verification is performed on the patrol inspectionsite, credibility verification may be performed on the patrol inspectionsite using a pre-established algorithm model, pre-stored labeledidentification information, labeled operating environment parameters,and historical attendance recording information. The algorithm model isan algorithm model computed and simulated according to the labeledidentification information, the labeled operating environmentparameters, and the historical attendance recording information using aneural network algorithm. By performing credibility verification on asite, whether the patrol inspection person records an attendance at aspecified site may be verified, and further, the patrol inspectionperson is supervised.

Credibility verification is performed on the patrol inspection personaccording to the biometric recognition information and the operatingenvironment parameters. When the biometric recognition information is avisual file including a human head portrait, credibility verification isperformed on a person using methods such as face recognition,comparative recognition based on environment images, Wi-Fi-based localpositioning, synchronous verification based on a picture taken by afront-facing camera and a picture taken by a rear-facing camera,action/motion recognition based on a 9-axis sensor, or three-dimensionalrecognition in imaging performed based on dual cameras and a focallength.

When the biometric recognition information is a human facial feature,credibility verification is performed on a person according to apre-stored human facial feature set. When the biometric recognitioninformation is a human fingerprint feature, credibility verification isperformed on the person according to a pre-stored human fingerprint set.

When a person does not need to be verified, credibility verificationdoes not need to be performed on the patrol inspection person.

The processes of performing credibility verification on the patrolinspection site and the patrol inspection person in this embodiment ofthe specification may be implemented by the mobile terminal used by thepatrol inspection person or may be implemented by a background server.

After credibility verification is performed on the patrol inspectionsite and/or the patrol inspection person, the method may furtherinclude: when the credibility verification succeeds, recordinginformation that indicates that the patrol inspection personsuccessfully adds an attendance record at the patrol inspection site.

After a computing result of a trusted environment is obtained, whetherthe attendance record is successfully added may be determined accordingto the computing result of the trusted environment. When credibilityverification is not performed on the person, whether the attendancerecord is successfully added is determined according to a credibilityverification result of the patrol inspection site. When credibilityverification is performed on both the patrol inspection site and theperson, whether the attendance record is successfully added isdetermined according to the credibility verification result of thepatrol inspection site and a credibility verification result of thepatrol inspection person. The verification result may be returned to themobile device to indicate that the identified proof information isverified.

After the determining is completed, information related to theattendance record may be stored to the blockchain. To save a storagespace of the blockchain, if the attendance is successfully recorded,information indicating a successful attendance recording is recorded,stored to and sent back to a user, to complete the attendance recordingat this position. If the attendance recording fails, information relatedto the attendance recording is not stored, and information indicating afailed attendance recording is sent back to the user, to prompt the userto record an attendance again. In this way, the storage space may besaved, and the attendance recording process may be optimized.

Information related to the attendance recording includes the patrolinspection proof information, the location-related information, thesensor data, a computing result of a trusted environment, or the like.

In this embodiment of the specification, before collecting patrolinspection proof information of a patrol inspection site using a mobileterminal in step S21, the method may further include detectingreliability of a system environment of the mobile terminal.

By detecting the reliability of the system environment of the mobileterminal, abnormal attendance recording caused by a system abnormal maybe avoided.

In this embodiment of the specification, by obtaining the patrolinspection proof information, the operating environment parameters, andthe biometric recognition information, and calculating the trustedenvironment of the patrol inspection according to the foregoing threetypes of information, whether a specified patrol inspection personarrives at a specified patrol inspection site and at a specified timecan be confirmed. In addition, the patrol inspection proof information,the operating environment parameters and the biometric recognitioninformation are stored using a blockchain technology, so that atraceable and tamperproof patrol inspection information record can beconveniently implemented. Once the information record needs to betraced, the cause of an event can be confirmed using a patrol inspectioninformation record stored in a blockchain, and credibility of the tracedinformation record is ensured. In this way, confidence and traceabilityof the patrol inspection information record of the patrol inspectionperson can be improved, thereby improving safety of a site and reducinga probability of safety problem occurrence.

Another embodiment of the specification further provides ablockchain-based proof storage method. As shown in FIG. 3, in themethod, first, patrol inspection proof information of a patrolinspection site is collected using a mobile terminal, and operatingenvironment parameters of the mobile terminal are obtained. Then,credibility of the patrol inspection site is computed according to theoperating environment parameters, and when the credibility verificationon the site succeeds, the patrol inspection proof information is storedto a blockchain for patrol inspection proof storage. In this way,confidence of the site can be ensured, and the patrol inspection personmay only need to verify the patrol inspection proof information, therebyreducing the verification time and saving the storage space.

An embodiment of the specification provides a method forblockchain-based patrol inspection proof storage. As shown in FIG. 3,the method specifically includes the following steps.

Step S31: collect patrol inspection proof information of a patrolinspection site using a mobile terminal.

Step S33: obtain operating environment parameters when the mobileterminal collects the patrol inspection proof information, wherein theoperating environment parameters include at least location-relatedinformation and sensor data of the mobile terminal.

Step S35: perform credibility verification on the patrol inspection sitebased on the location-related information and the sensor data.

Step S37: when the credibility verification succeeds, uploadirreversible verification information of patrol inspection proof storageinformation to a blockchain for patrol inspection proof storage, whereinthe blockchain is configured to verify that data stored in theblockchain is trusted, and the patrol inspection proof storageinformation includes at least the patrol inspection proof information.

Since step S31 is similar to step S21, please refer to step S21 forrelated contents. Since the procedure in step S33 is similar to that instep S23, please refer to step S23 for related contents. Details are notdescribed herein again.

For step S35, after the operating environment parameters are obtainedwhen the mobile terminal collects the patrol inspection proofinformation, credibility verification is performed on the patrolinspection site according to the operating environment parameters. Forthe operating environment parameters, the location-related information,and the sensor data, refer to the operating environment parameters andthe location-related information in the embodiment shown in FIG. 2.Details are not described again.

A location of the patrol inspection site may be positioned using thelocation-related information and the sensor data, and credibilityverification is performed on the positioned location of the patrolinspection site using the pre-stored location information of the labeledpatrol inspection site, and in this way, whether the location is thepatrol inspection site can be verified.

In addition, credibility verification may further be performed on thepatrol inspection site according to the patrol inspection proofinformation and the operating environment parameters, whether the patrolinspection location is a labeled patrol inspection site can bedetermined using the operating environment parameter, and whether thepatrol inspection site is a specified patrol inspection site may beverified with reference to the patrol inspection proof information. Ifthe patrol inspection site is the specified patrol inspection site, itindicates that the credibility verification of the site succeeds. If thepatrol inspection site is not the specified patrol inspection site, eventhough it is verified that the patrol inspection location is a labeledpatrol inspection site but is not a specified patrol inspection site, itindicates that the credibility verification of the site fails. Only whenthe patrol inspection location is both a labeled patrol inspection siteand a specified patrol inspection site, it indicates that thecredibility verification succeeds. For a related part, refer to contentsin step S25.

When the credibility verification succeeds, the irreversibleverification information of the patrol inspection proof storageinformation is uploaded to the blockchain, wherein the patrol inspectionproof storage information includes at least the patrol inspection proofinformation, the irreversible verification information refers to adigest of the patrol inspection proof information and signatureinformation for the patrol inspection person to sign the digest using aprivate key, or the irreversible verification information refers tosignature information for the patrol inspection person to sign thedigest using a private key.

When the operating environment parameters are collected, biometricrecognition information of the patrol inspection person may further becollected. For a specific collection process, please refer contents ofstep S23. After the verification of the patrol inspection site succeeds,personnel verification may further be performed on the patrol inspectionperson. For details, refer to contents in step S25. If a patrolinspection plan requires a specified patrol inspection person to performa patrol inspection at a specified patrol inspection site, the patrolinspection person needs to be verified. After the verification succeeds,irreversible verification information of the patrol inspection proofstorage information is uploaded to the blockchain, wherein the patrolinspection proof storage information includes at least the patrolinspection proof information and the biometric recognition informationof the patrol inspection person. In this way, credibility verificationis performed on both the person and the site.

In an embodiment provided in the specification, after credibilityverification is performed on the patrol inspection site and/or thepatrol inspection person, the method further includes, when thecredibility verification succeeds, recording information that indicatesthat the patrol inspection person successfully recording an attendanceat the patrol inspection site.

In an embodiment provided in the specification, the sensor data includestemperature information, humidity information, atmospheric pressureinformation, sensor data of at least one axis of a multi-axis sensor, ora combination thereof.

In an embodiment provided in the specification, the operatingenvironment parameters further include a focal length of a camera.

In an embodiment provided in the specification, the collecting patrolinspection proof information of a patrol inspection site using a mobileterminal includes imaging a marker of the patrol inspection site usingthe mobile terminal, to obtain a visual file of the marker, and usingthe visual file as the patrol inspection proof information.

In an embodiment provided in the specification, the collecting patrolinspection proof information of a patrol inspection site using a mobileterminal includes scanning a barcode of the patrol inspection site usingthe mobile terminal, to obtain the patrol inspection proof informationcarried in the barcode.

In an embodiment provided in the specification, the collecting patrolinspection proof information of a patrol inspection site using a mobileterminal includes receiving, using an NFC module of the mobile terminal,a signal sent by an NFC device at the patrol inspection site, to obtainthe patrol inspection proof information included in the signal.

In an embodiment provided in the specification, the patrol inspectionproof information carries a time stamp.

In an embodiment provided in the specification, the operatingenvironment parameters further include a time stamp.

In an embodiment provided in the specification, before collecting patrolinspection proof information of a patrol inspection site using a mobileterminal, the method further includes: detecting reliability of a systemenvironment of the mobile terminal; and the collecting patrol inspectionproof information of a patrol inspection site using a mobile terminalincludes, after passing the reliability detection, collecting the patrolinspection proof information of the patrol inspection site using themobile terminal.

The method for blockchain-based storage of patrol inspection proofprovided in this embodiment is similar to that of the method provided instep S21 to step S25. For the related parts, please refer to contents ofstep S21 to step S25, which are not described herein again.

An embodiment of the specification further provides a patrol inspectionverification method. FIG. 4 is a flowchart of a patrol inspectionverification method, according to an embodiment of the specification.The patrol inspection verification method includes the following steps.

Step S41: receive a filtering condition input by an inspecting person,wherein the filtering condition is used to filter patrol inspectionproof storage information of a specified patrol inspection person at aspecified patrol inspection site.

Step S43: query, according to the filtering condition, for the patrolinspection proof storage information corresponding to the specifiedpatrol inspection person and the specified patrol inspection site.

When inspecting patrol inspection information, an inspecting person usesan inspecting terminal to enter a patrol inspection verification page toverify the patrol inspection information. The inspecting terminal may bea mobile phone or another device that can log in to the patrolinspection verification page.

After logging in to an APP or an applet, the inspecting person entersthe verification page, and inputs a filtering condition, for example, atime, a patrol inspection person number, or the like. After receiving apatrol inspection application, the inspecting terminal sends the patrolinspection application to a server and queries for corresponding patrolinspection proof storage information.

Step S45: perform credibility verification on the patrol inspectionproof storage information based on irreversible verification informationthat corresponds to the specified patrol inspection person and thespecified patrol inspection site and that is stored in a proof storageblockchain.

The patrol inspection proof storage information refers to informationrelated to attendance recording, including patrol inspection proofinformation, location-related information, sensor data, a computingresult of a trusted environment, or the like.

Before the patrol inspection proof storage information is verified,reliability of the patrol inspection proof storage information needs tobe ensured. If the patrol inspection proof storage information has beentampered with, the verification on the patrol inspection proof storageinformation is meaningless.

After the patrol inspection proof storage information is found through aquery, irreversible verification information of the patrol inspectionproof storage information is computed, and the irreversible verificationinformation is compared with corresponding irreversible verificationinformation stored on a blockchain. If the two pieces of irreversibleverification information are consistent, it indicates that the patrolinspection proof storage information is not tampered with and can betrusted. If the pieces of irreversible verification information areinconsistent, it indicates that the patrol inspection proof storageinformation may be tampered with and is untrusted. By verifying a hashvalue of the patrol inspection proof storage information, whether thepatrol inspection proof storage information can be trusted isdetermined.

After credibility verification on the patrol inspection proof storageinformation is completed, a verification result may further be output tothe inspecting person. Using the verification result, the inspectingperson may selectively verify the patrol inspection proof storageinformation, to improve patrol inspection efficiency.

The execution entities of the steps in the method provided in theembodiments may be a same device, or execution entities of the methodmay be different devices. For example, an execution entity of step 11and step 12 may be a device 1, an execution entity of step 13 may be adevice 2. For another example, an execution entity of step 11 may be thedevice 1, an execution entity of step 12 and step 13 may be the device2, and so on.

The foregoing describes an embodiment of the specification, and otherembodiments of the specification may fall within a scope of appendedclaims. In some cases, actions or steps described in the claims may beperformed in a sequence different from a sequence in the embodiments andan expected result may be still achieved. In addition, a proceduredescribed in the accompanying drawings may produce a desired resultwithout necessarily using a shown specific sequence or a shownconsecutive sequence. In some embodiments, multitasking processing andparallel processing may also be acceptable or may be favorable.

FIG. 5 is a schematic structural diagram of a patrol inspection proofstorage apparatus, according to an embodiment of the specification.Referring to FIG. 5, a patrol inspection proof storage apparatus 500 mayinclude: a proof information collection module 502, configured tocollect patrol inspection proof information of a patrol inspection siteusing a mobile terminal; an environment parameter collection module 504,configured to obtain operating environment parameters when the patrolinspection proof information is collected, wherein the operatingenvironment parameters include at least location-related information andsensor data of the mobile terminal; and an information storage module506, configured to upload irreversible verification information ofpatrol inspection proof storage information to a blockchain, wherein theblockchain is configured to verify that data stored in the blockchain istrusted, and the patrol inspection proof storage information includesthe patrol inspection proof information, the location-relatedinformation, and/or the sensor data.

In an embodiment, the patrol inspection proof storage apparatus 500further includes:

a credibility verification module 508, configured to perform credibilityverification on the patrol inspection site and/or a patrol inspectionperson.

The information storage module 506 is specifically configured to, whenthe credibility verification succeeds, upload the irreversibleverification information of the patrol inspection proof storageinformation to the blockchain.

In an embodiment, the patrol inspection proof storage apparatus 500further includes:

a biometric information collection module 510, configured to collectbiometric recognition information of the patrol inspection person.

The credibility verification module 508 may be configured to performcredibility verification on the patrol inspection person according tothe biometric recognition information.

In an embodiment, the credibility verification module 508 may further beconfigured to perform credibility verification on the patrol inspectionsite according to the patrol inspection proof information and theoperating environment parameters.

In an embodiment, the patrol inspection proof storage apparatus 500further includes:

a success attendance recording module, configured to, when thecredibility verification succeeds, record information that indicatesthat the patrol inspection person successfully records an attendance atthe patrol inspection site.

Specifically, the location-related information includes at least one ofthe following: global positioning system GPS positioning information ofthe mobile terminal; base station information within a first presetdistance from the mobile terminal; wireless fidelity Wi-Fi informationwithin a second preset distance from the mobile terminal; Bluetoothinformation within a third preset distance from the mobile terminal; andhotspot information within a fourth preset distance from the mobileterminal.

Specifically, the sensor data includes at least one of the following:temperature information, humidity information, atmospheric pressureinformation, or sensor data of at least one axis of a multi-axis sensor.

In an embodiment, the operating environment parameters further include:a focal length of a camera.

In an embodiment, the proof information collection module 502 isspecifically configured to: image a marker of the patrol inspection siteusing the mobile terminal, to obtain a visual file of the marker, anduse the visual file as the patrol inspection proof information.

In an embodiment, the proof information collection module 502 isspecifically configured to: scan a barcode of the patrol inspection siteusing the mobile terminal, to obtain the patrol inspection proofinformation includes in the barcode.

In an embodiment, the proof information collection module 502 isspecifically configured to: receive, using an NFC module of the mobileterminal, a signal sent by an NFC device at the patrol inspection site,to obtain the patrol inspection proof information carried in the signal.

In an embodiment, the irreversible verification information may include:a digest of the patrol inspection proof storage information, and/orsignature information after a patrol inspection person signs the digestusing a private key.

In an embodiment, the patrol inspection proof information carries a timestamp.

In an embodiment, the operating environment parameters further include atime stamp.

In an embodiment, the patrol inspection proof storage apparatus 500further includes: a system detection module 512, configured to detectreliability of a system environment of the mobile terminal.

The proof information collection module 502 is specifically configuredto after the reliability passes the detection, collect the patrolinspection proof information of the patrol inspection site using themobile terminal.

The apparatus provided in this embodiment may be implemented by hardwareof a computer, or may be implemented by software. The blockchain-basedpatrol inspection proof storage apparatus 500 may implement the methodin the method embodiment shown in FIG. 2. Reference may be made to theblockchain-based patrol inspection proof storage method shown in FIG. 2for details, and the details are not described herein again.

FIG. 6 is a schematic structural diagram of a blockchain-based patrolinspection proof storage apparatus, according to another embodiment ofthe specification. Referring to FIG. 6, a blockchain-based patrolinspection proof storage apparatus 600 includes: a proof informationcollection module 602, configured to collect patrol inspection proofinformation of a patrol inspection site; an environment parametercollection module 604, configured to obtain operating environmentparameters when the patrol inspection proof information is collected,wherein the operating environment parameters include at leastlocation-related information and sensor data of the mobile terminal; acredibility verification module 606, configured to perform credibilityverification on the patrol inspection site based on the location-relatedinformation and the sensor data; and a proof information storage module608, configured to: when the credibility verification succeeds, uploadirreversible verification information of patrol inspection proof storageinformation to a proof storage blockchain, wherein the proof storageblockchain is configured to verify that data stored in the proof storageblockchain is trusted, and the patrol inspection proof storageinformation includes at least the patrol inspection proof information.

In an embodiment provided in the specification, the patrol inspectionproof storage apparatus 600 further includes: an attendance recordingmodule 610, configured to, when the credibility verification succeeds,record information that indicates that the patrol inspection personsuccessfully records an attendance at the patrol inspection site.

In an embodiment provided in the specification, the location-relatedinformation includes at least one of the following: global positioningsystem GPS positioning information of the mobile terminal; base stationinformation within a first preset distance from the mobile terminal;wireless fidelity Wi-Fi information within a second preset distance fromthe mobile terminal; Bluetooth information within a third presetdistance from the mobile terminal; and hotspot information within afourth preset distance from the mobile terminal.

In an embodiment provided in the specification, the sensor data includesone of the following: temperature information, humidity information,atmospheric pressure information, and sensor data of at least one axisof a multi-axis sensor.

In an embodiment provided in the specification, the operatingenvironment parameters further include: a focal length of a camera.

In an embodiment provided in the specification, the proof informationcollection module 602 is configured to: image a marker of the patrolinspection site using the mobile terminal, to obtain a visual file ofthe marker, and use the visual file as the patrol inspection proofinformation.

In an embodiment provided in the specification, the proof informationcollection module 602 is configured to: scan a barcode of the patrolinspection site using the mobile terminal, to obtain the patrolinspection proof information carried in the barcode.

In an embodiment provided in the specification, the proof informationcollection module 602 is configured to: receive, using an NFC module ofthe mobile terminal, a signal sent by an NFC device at the patrolinspection site, to obtain the patrol inspection proof informationcarried in the signal.

In an embodiment provided in the specification, the patrol inspectionproof information carries a time stamp.

In an embodiment provided in the specification, the operatingenvironment parameters further include a time stamp.

In an embodiment provided in the specification, the patrol inspectionproof storage apparatus 600 further includes: a system detection module612, configured to detect reliability of a system environment of themobile terminal. The proof information collection module 602 isspecifically configured to: after the reliability passes the detection,collect patrol inspection proof information of a patrol inspection siteusing a mobile terminal;

The apparatus provided in this embodiment may be implemented by hardwareof a computer, or may be implemented by software. This is not limitedherein. The blockchain-based patrol inspection proof storage apparatus600 may implement the method in the method embodiment shown in FIG. 3.Reference may be made to the blockchain-based patrol inspection proofstorage method shown in FIG. 3 for details, and the details are notdescribed herein again.

FIG. 7 is a schematic structural diagram of a patrol inspectionverification apparatus, according to an embodiment of the specification.Referring to FIG. 7, a patrol inspection verification apparatus 700 mayinclude: a condition receiving module 701, configured to receive afiltering condition input by an inspecting person; a file queryingmodule 702, configured to query for the corresponding patrol inspectionproof storage information according to the filtering condition; and afile verification module 703, configured to perform credibilityverification on the patrol inspection proof storage information based onirreversible verification information stored in a proof storageblockchain.

The filtering condition includes a time, a patrol inspection personnumber, and the like.

The apparatus provided in this embodiment may be implemented by hardwareof a computer, or may be implemented by software. The patrol inspectionverification apparatus 700 may implement the method in the methodembodiment shown in FIG. 4. Reference may be made to the patrolinspection verification method shown in FIG. 4, and the details are notdescribed herein again.

FIG. 8 is a schematic structural diagram of an electronic deviceaccording to an embodiment of the specification. Referring to FIG. 8, atthe hardware level, the electronic device includes a processor, and mayinclude an internal bus, a network interface, and a memory. The memorymay include a memory, for example, a random access memory (RAM), or mayfurther include a non-volatile memory, for example, at least onemagnetic disk memory. Certainly, the electronic device may furtherinclude hardware required for other services.

The processor, the network interface, and the memory may be connected toeach other through the internal bus. The internal bus may be an industrystandard architecture (ISA) bus, a peripheral component interconnect(PCI) bus, or an extended industry standard architecture (EISA) bus. Thebus may be classified into an address bus, a data bus, a control bus,and the like. For ease of illustration, in FIG. 8, the bus isrepresented using only one double-sided arrow. This, however, does notindicate that there is only one bus or only one type of bus.

The memory is configured to store a program. Specifically, the programmay include program code, wherein the program code includes a computeroperation instruction. The memory may include an internal memory and anon-volatile memory, and provide instructions and data to the processor.

The processor reads a corresponding computer program from thenon-volatile memory into the memory and then executes the computerprogram, to form a blockchain-based patrol inspection proof storageapparatus at the logic level. The processor executes the program storedin the memory and is specifically configured to perform the followingoperations: collecting patrol inspection proof information of a patrolinspection site; obtaining operating environment parameters when thepatrol inspection proof information is collected, wherein the operatingenvironment parameters include at least location-related information andsensor data of the mobile terminal; and uploading irreversibleverification information of patrol inspection proof storage informationto a proof storage blockchain, wherein the proof storage blockchain isconfigured to verify that data stored in the proof storage blockchain istrusted, and the patrol inspection proof storage information includesthe patrol inspection proof information, the location-relatedinformation, and/or the sensor data.

In an embodiment, the processor executes the program stored in thememory and is configured to perform the following operations: collectingpatrol inspection proof information of a patrol inspection site using amobile terminal; obtaining operating environment parameters when themobile terminal collects the patrol inspection proof information,wherein the operating environment parameters include at leastlocation-related information and sensor data of the mobile terminal;performing credibility verification on the patrol inspection site basedon the location-related information and the sensor data; and when thecredibility verification succeeds, uploading irreversible verificationinformation of patrol inspection proof storage information to a proofstorage blockchain, wherein the proof storage blockchain is configuredto verify that data stored in the proof storage blockchain is trusted,and the patrol inspection proof storage information includes at leastthe patrol inspection proof information.

The foregoing blockchain-based patrol inspection proof storage apparatusdisclosed in the embodiments shown in FIG. 2 or FIG. 3 of thespecification may be applied to a processor or implemented by aprocessor. The processor may be an integrated circuit chip and has asignal processing capability. In an embodiment, steps of the foregoingmethod may be implemented using a hardware integrated logic circuit inthe processor or instructions in a form of software. The processor maybe a general processor, including a central processing unit (CPU), anetwork processor (NP), and the like; or may further be a digital signalprocessor (DSP), an application-specific integrated circuit (ASIC), afield programmable gate array (FPGA), or another programmable logicaldevice, discrete gate or transistor logical device, or discrete hardwarecomponent. It may implement or perform the methods, the steps, andlogical block diagrams that are disclosed in the embodiments of thespecification. The general-purpose processor may be a microprocessor, orthe processor may be any conventional processor or the like. Steps ofthe methods disclosed with reference to the embodiments of thespecification may be directly performed and completed using a hardwaredecoding processor, or may be performed and completed using acombination of hardware and a software module in the decoding processor.The software module may be located in a mature storage medium in theart, such as a RAM, a flash memory, a ROM, a programmable ROM, anelectrically erasable programmable memory, or a register. The storagemedium is located in the memory, and the processor reads information inthe memory and completes the steps in the foregoing methods incombination with hardware of the processor.

The electronic device may further perform the method in FIG. 2 or FIG.3, and implement functions of the patrol inspection proof storageapparatus in the embodiment shown in FIG. 2 or FIG. 3, which is notdescribed in the embodiment of the specification again.

FIG. 9 is a schematic structural diagram of an electronic deviceaccording to an embodiment of the specification. Referring to FIG. 9, atthe hardware level, the electronic device includes a processor, and Inan embodiment, includes an internal bus, a network interface, and amemory. The memory may include a memory, for example, a random accessmemory (RAM), or may further include a non-volatile memory, for example,at least one magnetic disk memory. Certainly, the electronic device mayfurther include hardware required for other services.

The processor, the network interface, and the memory may be connected toeach other through the internal bus. The internal bus may be an industrystandard architecture (ISA) bus, a peripheral component interconnect(PCI) bus, or an extended industry standard architecture (EISA) bus. Thebus may be classified into an address bus, a data bus, a control bus,and the like. For ease of illustration, in FIG. 9, the bus isrepresented using only one double-sided arrow. This, however, does notindicate that there is only one bus or only one type of bus.

The memory is configured to store a program. Specifically, the programmay include program code, wherein the program code includes a computeroperation instruction. The memory may include an internal memory and anon-volatile memory, and provide instructions and data to the processor.

The processor reads a corresponding computer program from thenon-volatile memory into the memory and then executes the computerprogram, to form a blockchain-based patrol inspection verificationapparatus at the logic level. The processor executes the program storedin the memory and is specifically configured to perform the followingoperations: receiving a filtering condition input by an inspectingperson, wherein the filtering condition is used to filter patrolinspection proof storage information of a specified patrol inspectionperson at a specified patrol inspection site; querying, according to thefiltering condition, for the patrol inspection proof storage informationcorresponding to the specified patrol inspection person and thespecified patrol inspection site; and performing credibilityverification on the patrol inspection proof storage information based onirreversible verification information that corresponds to the specifiedpatrol inspection person and the specified patrol inspection site andthat is stored in a proof storage blockchain.

The foregoing blockchain-based patrol inspection verification apparatusdisclosed in the embodiment shown in FIG. 4 of the specification may beapplied to a processor or implemented by a processor. The processor maybe an integrated circuit chip and has a signal processing capability. Inan embodiment, steps of the foregoing method may be implemented using ahardware integrated logic circuit in the processor or instructions in aform of software. The processor may be a general processor, including acentral processing unit (CPU), a network processor (NP), and the like;or may further be a digital signal processor (DSP), anapplication-specific integrated circuit (ASIC), a field programmablegate array (FPGA), or another programmable logical device, discrete gateor transistor logical device, or discrete hardware component. It mayimplement or perform the methods, the steps, and logical block diagramsthat are disclosed in the embodiments of the specification. Thegeneral-purpose processor may be a microprocessor, or the processor maybe any conventional processor or the like. Steps of the methodsdisclosed with reference to the embodiments of the specification may bedirectly performed and completed using a hardware decoding processor, ormay be performed and completed using a combination of hardware and asoftware module in the decoding processor. The software module may belocated in a mature storage medium in the art, such as a RAM, a flashmemory, a ROM, a programmable ROM, an electrically erasable programmablememory, or a register. The storage medium is located in the memory, andthe processor reads information in the memory and completes the steps inthe foregoing methods in combination with hardware of the processor.

The electronic device may further perform the method in FIG. 4, andimplement functions of the patrol inspection verification apparatus inthe embodiment shown in FIG. 4, which is not described in the embodimentof the specification again.

Definitely, in addition to a software implementation, the electronicdevice in the specification does not exclude other implementations, forexample, a logic device or a combination of software and hardware. Inother words, an entity executing the following processing procedure isnot limited to the logic units, and may also be hardware or logicdevices.

Embodiments of the specification are described above. Other embodimentsfall within the scope of the appended claims. In some embodiments, theactions or steps recorded in the claims may be performed in sequencesdifferent from those in the embodiments and an expected result may stillbe achieved. In addition, the processes depicted in the accompanyingdrawings do not necessarily require specific sequences or consecutivesequences to achieve an expected result. In some implementations,multitasking and parallel processing may be feasible or beneficial.

The foregoing descriptions are merely embodiments of the specificationand are not intended to limit the protection scope of the specification.Any modification, equivalent replacement, or improvement made within thespirit and principle of one or more embodiments of the specificationshall fall within the protection scope of one or more embodiments of thespecification.

The system, the apparatus, the module or the unit described in theforegoing embodiments can be specifically implemented by a computer chipor an entity or implemented by a product having a certain function. Atypical implementation device is a computer. Specifically, the computercan be, for example, a personal computer, a laptop computer, a cellularphone, a camera phone, a smartphone, a personal digital assistant, amedia player, a navigation device, an email device, a game console, atablet computer, a wearable device, or a combination of any of thesedevices.

Particular embodiments further provide a system comprising a processorand a non-transitory computer-readable storage medium storinginstructions executable by the processor to cause the system to performoperations corresponding to steps in any method of the embodimentsdisclosed above. Particular embodiments further provide a non-transitorycomputer-readable storage medium configured with instructions executableby one or more processors to cause the one or more processors to performoperations corresponding to steps in any method of the embodimentsdisclosed above.

When the functions disclosed herein are implemented in the form ofsoftware functional units and sold or used as independent products, theycan be stored in a processor executable non-volatile computer readablestorage medium. Particular technical solutions disclosed herein (inwhole or in part) or aspects that contributes to current technologiesmay be embodied in the form of a software product. The software productmay be stored in a storage medium, comprising a number of instructionsto cause a computing device (which may be a personal computer, a server,a network device, and the like) to execute all or some steps of themethods of the embodiments. The storage medium may comprise a flashdrive, a portable hard drive, ROM, RAM, a magnetic disk, an opticaldisc, another medium operable to store program code, or any combinationthereof.

The computer readable medium includes a persistent medium and anon-persistent medium, a removable medium and a non-removable medium,which may implement storage of information using any method ortechnology. The information may be a computer readable instruction, adata structure, a module of a program or other data. Examples ofcomputer storage media include but are not limited to a phase changememory (PRAM), a static random access memory (SRAM), a dynamic randomaccess memory (DRAM), other type of random access memory (RAM), aread-only memory (ROM), an electrically erasable programmable read-onlymemory (EEPROM), a flash memory or other memory technology, a compactdisc read-only memory (CD-ROM), a digital versatile disc (DVD) or otheroptical storage, a cassette magnetic tape, tape and disk storage orother magnetic storage device or any other non-transmission media thatmay be configured to store information that a computing device canaccess. Based on the definition in the specification, thecomputer-readable medium does not include transitory computer readablemedia (transitory media), such as a modulated data signal and a carrier.

It should also be noted that the terms “include”, “comprise” and anyother variants mean to cover the non-exclusive inclusion. Thereby, theprocess, method, article, or device which include a series of elementsnot only include those elements, but also include other elements whichare not clearly listed, or include the inherent elements of the process,method, article and device. Without further limitation, the elementdefined by a phrase “include one” does not exclude other same elementsin the process, method, article or device which include the element.

The embodiments in the specification are all described in a progressivemanner, for same or similar parts in the embodiments, refer to theseembodiments, and descriptions of each embodiment focus on a differencefrom other embodiments. Especially, a system embodiment is basicallysimilar to a method embodiment, and therefore is described briefly; forrelated parts, reference may be made to partial descriptions in themethod embodiment.

What is claimed is:
 1. A computer-implemented method forblockchain-based storage of patrol inspection proof, comprising:receiving, by a server, proof information of a labeled position at apatrol inspection site and biometric recognition information of a personconducting patrol inspection; performing, by the server, credibilityverification on the patrol inspection by: verifying the proofinformation using an algorithm model based on labeled identificationinformation and historical attendance information stored in ablockchain; verifying the biometric recognition information according topre-stored biometric recognition information; and verifying that thebiometric recognition information is obtained by a mobile terminalsynchronously with the proof information; and in response to thecredibility verification being successful, uploading, by the server,verification information associated with the proof information and thebiometric recognition information for storing in the blockchain.
 2. Themethod of claim 1, further comprising, before the receiving: receiving,by the mobile terminal, an attendance recording instruction to recordattendance of the patrol inspection; obtaining, by the mobile terminal,(1) biometric recognition information of the person conducting thepatrol inspection, (2) proof information of the labeled position at thepatrol inspection site, and (3) one or more operating environmentparameters of the mobile terminal at a time of the patrol inspection,wherein the one or more operating environment parameters comprisessensor data of the mobile terminal; and sending, by the mobile terminalto the server, the obtained biometric recognition information, theobtained proof information, and the obtained one or more operatingenvironment parameters.
 3. The method of claim 1, further comprising:receiving, from a client terminal, one or more filtering conditionsassociated with the patrol inspection site; querying to identify theproof information of the patrol inspection at the patrol inspectionsite; verifying the identified proof information based on theverification information stored in the blockchain; and returning, to theclient terminal, a verification result indicating that the identifiedproof information is verified.
 4. The method of claim 2, wherein: theone or more operating environment parameters comprises locationinformation.
 5. The method of claim 4, wherein the location informationcomprises: global positioning system (GPS) positioning information ofthe mobile terminal; base station information within a first presetdistance from the mobile terminal; wireless fidelity (Wi-Fi) informationwithin a second preset distance from the mobile terminal; Bluetoothinformation within a third preset distance from the mobile terminal; orhotspot information within a fourth preset distance from the mobileterminal.
 6. The method of claim 2, wherein the sensor data comprises:temperature information, humidity information, atmospheric pressureinformation, or sensor data of at least one axis of a multi-axis sensor.7. The method of claim 2, wherein the one or more operating environmentparameters further comprise: a focal length of a camera.
 8. The methodof claim 1, wherein the proof information comprises: a visual file of amarker of the patrol inspection site captured using the mobile terminal.9. The method of claim 1, wherein the proof information comprises:information obtained by scanning a barcode of the patrol inspection siteusing the mobile terminal.
 10. The method of claim 1, wherein the proofinformation comprises: information in a signal received by an NFC moduleof the mobile terminal from an NFC device at the patrol inspection site.11. The method of claim 1, wherein the verification informationcomprises: a digest of the proof information and one or more operatingenvironment parameters; or a digital signature on the digest based on aprivate key of the patrol inspection person.
 12. The method of claim 2,wherein the proof information or the one or more operating environmentparameters comprise a time stamp of the patrol inspection.
 13. A systemfor blockchain-based storage of patrol inspection proof, comprising aprocessor and a non-transitory computer-readable storage medium storinginstructions executable by the processor to cause the system to performoperations comprising: receiving proof information of a labeled positionat a patrol inspection site and biometric recognition information of aperson conducting patrol inspection; performing credibility verificationon the patrol inspection by: verifying the proof information using analgorithm model based on labeled identification information andhistorical attendance information stored in a blockchain; verifying thebiometric recognition information according to pre-stored biometricrecognition information; and verifying that the biometric recognitioninformation is obtained by a mobile terminal synchronously with theproof information; and in response to the credibility verification beingsuccessful, uploading verification information associated with the proofinformation and the biometric recognition information for storing in theblockchain.
 14. The system of claim 13, wherein the verificationinformation comprises: a digest of the proof information and one or moreoperating environment parameters; or a digital signature on the digestbased on a private key of the patrol inspection person.
 15. The systemof claim 13, wherein the operations further comprise: receiving one ormore filtering conditions associated with the patrol inspection site;querying to identify the proof information of the patrol inspection atthe patrol inspection site; verifying the identified proof informationbased on the verification information stored in the blockchain; andreturning a verification result indicating that the identified proofinformation is verified.
 16. The system of claim 14, wherein: the one ormore operating environment parameters comprises location information.17. The system of claim 13, wherein the proof information comprises: avisual file of a marker of the patrol inspection site captured using themobile terminal.
 18. The system of claim 13, wherein the proofinformation comprises: information obtained by scanning a barcode of thepatrol inspection site using the mobile terminal.
 19. The system ofclaim 13, wherein the proof information comprises: information in asignal received by an NFC module of the mobile terminal from an NFCdevice at the patrol inspection site.
 20. A non-transitorycomputer-readable storage medium for blockchain-based storage of patrolinspection proof, configured with instructions executable by one or moreprocessors to cause the one or more processors to perform operationscomprising: receiving proof information of a labeled position at apatrol inspection site and biometric recognition information of a personconducting patrol inspection; performing credibility verification on thepatrol inspection by: verifying the proof information using an algorithmmodel based on labeled identification information and historicalattendance information stored in a blockchain; verifying the biometricrecognition information according to pre-stored biometric recognitioninformation; and verifying that the biometric recognition information isobtained by a mobile terminal synchronously with the proof information;and in response to the credibility verification being successful,uploading verification information associated with the proof informationand the biometric recognition information for storing in the blockchain.